﻿<!DOCTYPE html>
<html lang="zh-cn" itemscope itemtype="http://schema.org/ImageGallery">
<head prefix="og: http://ogp.me/ns#">
    <meta charset="utf-8" />
    <title itemprop="name">@ViewData["Title"] - PhotoGallery</title>
    <meta name="description" content="@ViewData["Description"]" />
    <meta name="keywords" content="@ViewData["Title"], photo, picture, gallery, images" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/css/site.scss" inline />
    @RenderSection("head", required: false)
    <meta name="application-name" content="@ViewData["Title"]" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="@ViewData["Title"]" />
    <meta property="og:url" content="@(Context.Request.Scheme + "://" + Context.Request.Host + Context.Request.Path)" />
    <meta property="og:image" content="@ViewData["Image"]" />
    <link rel="shortcut icon" href="~/img/favicon.png" type="image/png" />


    <link href="https://cdn.bootcss.com/notie/4.3.1/notie.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous" />

    @RenderSection("Styles", false)
</head>
<body>
    <header>

        <a href="./">
            <h1 class="header-title">苒苒的相册</h1>
        </a>
        <ul class="m-nav">
            <li><a href="./">首页</a><span class="sep">/</span></li>
            <li><a href="#" id="searchButton">搜索</a><span class="sep">/</span></li>
            <li><a href="@Url.Action("about","Home")">关于</a></li>
            <li id="searchArea" style="display: none;">
                <div class="col-lg-12">
                    <div class="input-group">
                        <input type="search" class="form-control" name="photoName" id="photoName" placeholder="请输入照片名称">
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="button" id="btnSearch">
                                Go!
                            </button>
                        </span>
                    </div><!-- /input-group -->
                </div><!-- /.col-lg-6 -->
            </li>
            <li>
                @if (!User.Identity.IsAuthenticated)
                {
                    <p><a asp-action="Login" asp-controller="Member">登录</a>,上传照片请使用安卓客户端</p>
                }
                else
                {
                    <a asp-action="index" asp-controller="UserManager">用户管理</a>
                }
            </li>
        </ul>
    </header>

    <div class="layout">
        @RenderBody()
    </div>

    <footer class="footer">
        <p class="container">
            By Murry.Yi
            <a href="/swagger/">Api说明</a>
            @{await Html.RenderPartialAsync("_LoginButton.cshtml");}
            <a href="http://www.miitbeian.gov.cn/">粤ICP备17145489号-1</a>
        </p>

    </footer>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"
            asp-fallback-src="~/lib/jQuery/dist/jquery.min.js"
            asp-fallback-test="window.jQuery"
            crossorigin="anonymous">

    </script>
    @*<script  type="text/javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>*@
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    @*<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>*@
    <script src="~/js/site.js" inline></script>
    <script src="https://cdn.bootcss.com/notie/4.3.1/notie.js"></script>
    <environment include="Development">
        @*开发环境*@


    </environment>
    <environment exclude="Development">
        @*生产环境*@

    </environment>
    <script>
        $(document).ready(function () {
            $("#searchButton").click(function () {
                $("#searchArea").toggle(500);
            })
            $("#btnSearch").click(function () {
                var name = $("#photoName").val().replace('#', '');
                if (name !== null && name !== undefined && name !== '') {
                    window.location.href = window.location.origin + "?photoName=" + name;
                }
                else {
                    window.location.href = window.location.origin;
                }
            });
        });
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
